<% 
	String UserEmail = (String) pageContext.getAttribute("USER_EMAILID");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Savvy Solutions - MPS Candidate</title><link rel="stylesheet" type="text/css" href="/css/coreBlue.css">
<link rel="stylesheet" type="text/css" href="/css/defaultThemeNew.css?OpenPage">
<link rel="stylesheet" type="text/css" href="/css/iehacks1.css">
<link rel="stylesheet" type="text/css" href="/css/blog.css">
<script language="JavaScript" type="text/javascript">
<!-- 
var req;

function ClearAll()
{
var temp1=""
temp1=document.getElementById("cmbCustomer")
temp1.selectedIndex=0
temp1=document.getElementById("cmbProcessarea")
temp1.selectedIndex=0
temp1=document.getElementById("cmbLocation")
temp1.selectedIndex=0
temp1=document.getElementById("cmbFinBenfit")
temp1.selectedIndex=0
temp1=document.getElementById("cmbAchBenfit")
temp1.selectedIndex=0
temp1=document.getElementById("fromDt")
temp1.value=""
temp1=document.getElementById("toDt")
temp1.value=""

location.href="/modules/default/find-solution-sub-mps.jsp?OpenView&Start=1&Count=10"
}


function Searchdocs()
{

var filter="Filters: "
tempForm=document.forms[0]
temp1=document.getElementById("cmbCustomer")
var tempval1=temp1.options[temp1.selectedIndex].text
var strparam="?sendparam=y"
if(tempval1=="--Select Customer--")
{
tempval1="0"
}
else
{
	strparam+="&cmbCustomer="+tempval1
filter+="Customer="+tempval1
}

temp1=document.getElementById("cmbLocation")
tempval2=temp1.options[temp1.selectedIndex].text
if(tempval2=="--Select Location--")
{
tempval2="0"
}
else
{
	strparam+="&cmbLocation="+tempval2
if(filter=="Filters: ")
filter+="Location="+tempval2
else
filter+=", Location="+tempval2
}


temp1=document.getElementById("cmbProcessarea")
tempval3=temp1.options[temp1.selectedIndex].text
if(tempval3=="--Select Process Area--")
{
tempval3="0"
}
else
{
	strparam+="&cmbProcessarea="+tempval3.replace("&", " and ")
if(filter=="Filters: ")
filter+="Process Area="+tempval3
else
filter+=", Process Area="+tempval3
}


temp1=document.getElementById("cmbFinBenfit")
tempval4=temp1.options[temp1.selectedIndex].text
if(tempval4=="--Select Financial Benefit--")
{
tempval4="0"
}
else
{
	strparam+="&cmbFinBenfit="+tempval4
if(filter=="Filters: ")
filter+="Financial Benefit="+tempval4
else
filter+=", Financial Benefit="+tempval4
}

temp1=document.getElementById("cmbAchBenfit")
tempval5=temp1.options[temp1.selectedIndex].text
if(tempval5=="--Select Achieved Benefit--")
{
tempval5="0"
}
else
{
	strparam+="&cmbAchBenfit="+tempval5
if(filter=="Filters: ")
filter+="Achieved Benefit="+tempval5
else
filter+=", Achieved Benefit="+tempval5
}




temp1=document.getElementById("fromDt")
tempval6=temp1.value
if(tempval6=="")
{
tempval6="0"
}
else
{
	strparam+="&fromDt="+tempval6
if(filter=="Filters: ")
filter+="From Date="+tempval6
else
filter+=", From Date="+tempval6
}

temp1=document.getElementById("toDt")
tempval7=temp1.value
if(tempval7=="")
{
tempval7="0"
}
else
{
	strparam+="&toDt="+tempval7
if(filter=="Filters: ")
filter+="To Date="+tempval7
else
filter+=", To Date="+tempval7
}


temp1=document.getElementById("cmbSolType")
tempval8=temp1.options[temp1.selectedIndex].text
if(tempval8=="--Select Solution Type--")
{
tempval8="0"
}
else
{
	strparam+="&cmbSolType="+tempval8
if(filter=="Filters: ")
filter+="Solution Type="+tempval8
else
filter+=", Solution Type="+tempval8
}


//alert(tempval1+"    "+tempval2+"    "+tempval3)
if(tempval3=="0" && tempval1=="0" && tempval2=="0"&&tempval4=="0"&&tempval5=="0"&&tempval6=="0"&&tempval7=="0"&&tempval8=="0")
{
//alert("Please select a filter ")
//return
}
//alert("alert here")
//document.getElementById("filters").innerHTML="<font color=\"black\"><p align=\"left\">"+filter+"</p><font>"
tempQuery="&FieldList=customer~site~process~fromDt~toDt~FinBenfit~AchBenfit~SolType="+tempval1+"~"+tempval2+"~"+tempval3+"~"+tempval6+"~"+tempval7+"~"+tempval4+"~"+tempval5+"~"+tempval8

//newQuery_string=document.getElementById("Query_String_val").value+tempQuery
//alert(newQuery_string)
//for ie

     if (window.XMLHttpRequest) {
//alert("in if")
		// we are in a non-IE browser
		xmlhttp=new XMLHttpRequest()
	} else if (window.ActiveXObject) {
//    alert("in else if")
	// we are in IE
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
//alert("before db name")
document.getElementById("view").innerHTML=''
//document.getElementById("srchResult").style.display=''


//alert("before db name")
dbName=document.getElementById("dbName").value
//alert(dbName)
//var vurl="/GetExpertRecomm?openagent&"+newQuery_string
		var vurl="/GetMPSCandidate"+strparam
//+newQuery_string
//alert(vurl)
	if (window.XMLHttpRequest) 
 	{   
//		alert('INSIDE HTTP')
		req = new XMLHttpRequest();
//		alert(req+' - - req - - ')
		//req.overrideMimeType('text/xml');

		req.onreadystatechange = processReqChange_lookup;
		req.open("POST", vurl , false);
		req.send(strparam);
     		 } 
        //checking whether browser is IE 
 	else if (window.ActiveXObject)
  	{
//    		alert('entered the else of XMLHTTPRequest--- '+ window.ActiveXObject)
		req=new ActiveXObject("Microsoft.XMLHTTP")
		
		 if (req)
	   { 

		req.onreadystatechange = processReqChange_lookup;
		req.open("POST", vurl, false);
		req.send(strparam);
           		}
        		} 



}

function processReqChange_lookup()
{  
    if (req.readyState == 4)             
 /*Only process if XML file is loaded completely:4="Complete" */
  {
         if (req.status == 200)           
 /*Only process if everything is ok*/
	    	{ 
xmlstr=req.responseText
populatelookup(xmlstr)
		        } 
   	 else 
  	 {
		alert("There was a problem retrieving the XML data:n" + req.statusText);
     	     } 
     	  }
}

function populatelookup(xmlstr)
{
document.getElementById("view").innerHTML=xmlstr
//document.getElementById("srchResult").innerHTML=''
}


function getPrimaryBenefit()
{
var selPrimary = document.forms[0].cmbPrimaryBenefit[document.forms[0].cmbPrimaryBenefit.selectedIndex].text;
if (selPrimary=="--Select Primary Benefit Category--")
{
	alert("Please select any option from the drop down list")
}
else
{
document.location.href = "/global/collaboration/SavvySol.nsf/frmMostSuccessAdaptedSolCurrent?OpenForm&"+selPrimary
}
}

function UnSubscribe(key,cnt,bchecked)
{
	
if(bchecked==true){	
if( document.getElementById("UnscribeKeyVal").value==""){
document.getElementById("UnscribeKeyVal").value=key; // + "~";
//alert(document.forms[0].UnscribeKeyVal.value)
}
else{
document.forms[0].UnscribeKeyVal.value=document.forms[0].UnscribeKeyVal.value+"~"+key //+ "~"
		}
	}
} // unsubscribe MPS Candidate

function RemoveMPSCandidate(){

UnscribeKeyVal = document.getElementById("UnscribeKeyVal").value;
//alert(document.forms[0].UnscribeKeyVal.value)
//alert(UnscribeKeyVal);
var uVal = new Array();
uVal = UnscribeKeyVal.split("~");
document.getElementById("UnscribeKeyVal").value="";
frm=document.forms[0];
for( x in uVal ) {
	SolID = uVal[x];
//for ie
	if (window.XMLHttpRequest) {
		// we are in a non-IE browser
		xmlhttp=new XMLHttpRequest()
	} else if (window.ActiveXObject) {
		// we are in IE
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	document.getElementById("view").style.display=''

agturl= "/ajxremovemps"
xmlhttp.open("POST",agturl,false)
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("sol_id=" + SolID)
xmlstr=xmlhttp.responseText
}
alert(ReplaceTags(xmlstr).replace(/^\s\s*/, '').replace(/\s\s*$/, ''));
//alert (xmlstr)
//location.href=location.href
//location.href = "/global/collaboration/SavvySol.nsf/frmMPSCandidate?Openform"
location.reload();
} // end RemoveMPSCandidate



function ReplaceTags(htmlstr)
{
      var regExp = /<\/?[^>]+>/gi;
        htmlstr = htmlstr.replace(regExp,"");
        return htmlstr;
      }
// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
document._domino_target = "_self";
function _doClick(v, o, t, h) {
  var form = document._frmMPSCandidate;
  if (form.onsubmit) {
     var retVal = form.onsubmit();
     if (typeof retVal == "boolean" && retVal == false)
       return false;
  }
  var target = document._domino_target;
  if (o.href != null) {
    if (o.target != null)
       target = o.target;
  } else {
    if (t != null)
      target = t;
  }
  form.target = target;
  form.__Click.value = v;
  if (h != null)
    form.action += h;
  form.submit();
  return false;
}
// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
function clear1()
{
document.forms[0].SearchQuery1.value=""

}

function copydata()
{

document.forms[0].SearchQuery.value=document.forms[0].SearchQuery1.value
}

// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
function soonLaunch()
{
alert("This exciting new tool is soon to come to Operations Central!")
}

function DoNothing()
{

}

// -->
</script>
</head>
<body text="#000000" bgcolor="#FFFFFF" onload="dbName=document.forms[0].dbName.value

if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
}
	document.getElementById(&quot;view&quot;).style.display=''
//alert(newQuery_string)
var  	vurl=&quot;/GetMPSCandidate?OpenAgent&amp;&quot;+Date()
//var vurl=&quot;/&quot; +dbName + &quot;/ReportFinBeneftSummary?openagent&amp;&quot;+newQuery_string

//checking whether browser is mozila or Netscape
	if (window.XMLHttpRequest) 
 	{   
//		alert('INSIDE HTTP')
		req = new XMLHttpRequest();
//		alert(req+' - - req - - ')
		//req.overrideMimeType('text/xml');

		req.onreadystatechange = processReqChange_lookup;
		req.open(&quot;POST&quot;, vurl , true);
		req.send(null);
     		 } 
        //checking whether browser is IE 
 	else if (window.ActiveXObject)
  	{
//    		alert('entered the else of XMLHTTPRequest--- '+ window.ActiveXObject)
		req=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;)
		
		 if (req)
	   { 
		req.onreadystatechange = processReqChange_lookup;
		req.open(&quot;POST&quot;, vurl, true);
		req.send();
         }
}  ">

<form method="post" action="/modules/default/find-solution-sub-mps.jsp?OpenForm&amp;Seq=1" name="_frmMPSCandidate">
<input type="hidden" name="__Click" value="0"><SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery-1.3.2.min.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery.cluetip.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/clueTip.js"  TYPE='text/javascript'></SCRIPT>
<link rel="stylesheet" type="text/css" href="/css/jquery.cluetip.css">
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery.tablesorter.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/jquery.tablesorter.pager.js"  TYPE='text/javascript'></SCRIPT><div style ="display:none">
<input name="KeyVal" value="">
<input name="UnscribeKeyVal" value="" id="UnscribeKeyVal"></div>
<div style="display:none"><tt>Openform</tt><tt>
<input name="dbName_1" value=""></tt><tt></tt></div>
<input type="hidden" name="dbName" value=""><SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/FusionCharts.js"  TYPE='text/javascript'></SCRIPT>
<!--</form>-->